package com.xbk.seckill.dubbo.interfaces.stock;

import com.xbk.seckill.common.cache.model.SeckillBusinessCache;
import com.xbk.seckill.common.model.dto.SeckillStockDTO;

/**
 * 库存和商品都要实现的Dubbo接口
 *
 * @author xiexu
 * @date 2025/4/4 14:20
 */
public interface SeckillStockDubboService {

    /**
     * 获取商品的可用库存
     */
    SeckillBusinessCache<Integer> getAvailableStock(Long goodsId, Long version);

    /**
     * 获取商品的库存信息
     */
    SeckillBusinessCache<SeckillStockDTO> getSeckillStock(Long goodsId, Long version);

}
